<div class="member">

    <?php echo $this->Session->Flash();?>

    <div class="row-fluid">
        <div>
        <h2>Thông tin cơ bản:
            <?php if(isset($_SESSION['user_id'])&&$_SESSION['user_id']==$user['id']){?>
            <div class="pull-right"><a title="Chỉnh sửa Trang cá nhân" href="<?php echo DOMAIN;?>user/info/<?php echo $user['id'];?>"><i class="img-pen"></i>Chỉnh sửa Trang cá nhân</a></div>
            <div class="pull-right" style="margin-right: 10px;"><a title="Thay đổi mật khẩu" href="<?php echo DOMAIN;?>user/pass/<?php echo $user['id'];?>"><i class="img-pen"></i>Thay đổi mật khẩu</a></div>
            <?php } ?>
        </h2>
        <table class="table">
            <tbody>
            <tr>
              <th>Họ tên</th>
              <td ><?php echo $user['fullname'];?></td>
            </tr>
            <tr>
              <th><?php echo lang('anh_dai_dien');?></th>
              <td >
                <img src="<?php echo IMG_URL.'h100/'.$user['images'];?>" />
                <br /><!--<a href="<?php //echo DOMAIN.'user/avatar/'.$user['id'];?>">Thay đổi</a>-->
                <!-- Button to trigger modal -->
                <?php if(isset($_SESSION['user_id'])&&$_SESSION['user_id']==$user['id']){?><a href="#myModal" data-toggle="modal">Thay đổi</a><?php }?>

                <!-- Modal -->
                <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h3 id="myModalLabel"><?php echo lang('anh_dai_dien');?></h3>
                    </div>
                    <form method="post" enctype="multipart/form-data" action="<?php echo DOMAIN;?>user/avatar/<?php echo $user['id'];?>">
                        <div class="modal-body">
                            <div class="member">
                                <div class="row-fluid">
                                    <table class="table">
                                      <tbody>
                                        <tr>
                                          <td>
                                            <img style="border: 1px dotted #ccc;height: 100px;" src="<?php echo IMG_URL; ?><?php echo $user_login['images']; ?>" /><br />
                                            <div class="clear-content"></div>
                                            <?php echo $this->Form->input('User.images',array('type'=>'file', 'accept'=>'image/gif,image/jpeg,image/png','label' => false, 'div' => false, 'legend'=> false));?>
                                          </td>
                                        </tr>
                                      </tbody>
                                    </table>
                                </div>
                            </div><!--end member-->
                        </div>
                        <div class="modal-footer">
                            <button class="btn btn-primary">Save changes</button>
                            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
                        </div>
                    </form>
                </div>

              </td>
            </tr>
            <tr>
              <th>Ngày sinh</th>
              <td> <?php echo $user['birth_date'];?>/<?php echo $user['birth_month'];?>/<?php echo $user['birth_year'];?></td>
            </tr>
            <tr>
              <th>Website</th>
              <td><a target="_blank" rel="nofollow" href="<?php echo $user['website'];?>"><?php echo $user['website'];?></a></td>
            </tr>
            <tr>
              <th>Email</th>
              <td> <?php echo $user['email'];?></td>
            </tr>
            <tr>
              <th>Điện thoại di động</th>
              <td> <?php echo $user['phone'];?></td>
            </tr>
            <tr>
            <tr>
              <th>Địa chỉ</th>
              <td> <?php echo $user['address'];?></td>
            </tr>
          </tbody>
        </table>
        </div>
    </div>

</div>